/*******************************************************************************
 * Copyright (c) 2010, 2015 git@git.oschina.net:kaiwill/springstage.git
 * <p/>
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.qinyeit.serviceapp.service.system.impl;

import com.qinyetech.springstage.core.fileupload.service.WebFileUploaderAdapter;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * ClassName: ImageFileUploadService <br/> 
 * Function: 文件上传功能<br/>
 * date: 18/3/06 10:25 <br/>
 *
 * @author wuqing
 * @version
 * @since JDK 1.7 
 */
@Service("fileUploadService")
public class FileUploadService extends WebFileUploaderAdapter {

    @Value("${application.fileupload_dir:}")
    private String rootPath;

    @Override
    public String getRootPath() {
        if(StringUtils.isBlank(rootPath)){
            return super.getRootPath();
        }
        return rootPath;
    }
}
